package com.example.repository;

import com.example.model.entity.Message;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

public interface MessageRepository extends JpaRepository<Message, Long> {
    Page<Message> findByToUserIdAndTypeInOrderByCreatedAtDesc(
            Long userId, 
            String[] types, 
            Pageable pageable
    );
} 